package com.bolt.core.view.components;


import java.util.ArrayList;
import java.util.List;

public class TableHead implements Comparable<TableHead>{
	private String field;
	
	private String title;

	private String listAlign = "left";
	
	private Boolean hidden;

	private String body;
	
	private String format;

	private Boolean order ;

	private String type;

	private String editor;

	private int colspan;

	private int rowspan;

    private int orderRank;
	
	private List<String> compute = new ArrayList();

	public void addCompute(String type){
		compute.add(type);
	}

	public List<String> getCompute() {
		return compute;
	}

	private int  width = 100;
	
	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public TableHead(){
		listAlign = "left";
		type = "string";
		hidden = false;
	}
	
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	
	
	public String getFormat() {
		return format;
	}
	public void setFormat(String format) {
		this.format = format;
	}
	
	public Boolean getHidden() {
		return hidden;
	}
	public void setHidden(Boolean hidden) {
		this.hidden = hidden;
	}
	public String getBody() {
		return body;
	}
	public void setBody(String body) {
		this.body = body;
	}
	
	public Boolean getOrder() {
		return order;
	}

	public void setOrder(Boolean order) {
		this.order = order;
	}
	
	@Override
    public int compareTo(TableHead o) {
	     return order.compareTo(o.getOrder());
	}
	public String getListAlign() {
		return listAlign;
	}

	public void setListAlign(String listAlign) {
		this.listAlign = listAlign;
	}
	
	public String getField() {
		return field;
	}

	public void setField(String field) {
		this.field = field;
	}
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	public String getEditor() {
		return editor;
	}

	public void setEditor(String editor) {
		this.editor = editor;
	}

    public int getColspan() {
        return colspan;
    }

    public void setColspan(int colspan) {
        this.colspan = colspan;
    }

    public int getRowspan() {
        return rowspan;
    }

    public void setRowspan(int rowspan) {
        this.rowspan = rowspan;
    }

    public int getOrderRank() {
        return orderRank;
    }

    public void setOrderRank(int orderRank) {
        this.orderRank = orderRank;
    }
}
